After completing this lesson, you’ll be able to:
There are several directory watch triggers: Resource or Network Directory (updated) and FTP Directory (updated) are the two most common but other watch services include Amazon S3 buckets and Dropbox directories.
These are trigger-only protocols that monitor folders and FTP sites for any changes, whether that be new files to be added, or existing files modified or deleted. When FME Flow sees a change, the trigger message contains the affected file path value.
A common, and perhaps the primary use case for this, is the ability to monitor a folder where datasets are stored. When a new dataset is placed in this folder, FME Flow Automations will pass this file path into a workspace to process the data with no need for any manual intervention.
This protocol allows files to be filtered by the action type so that it is not just the creation of a new file that can be monitored. It's also possible to monitor for existing file deletions and modifications.
Some of these directory watch trigger types have corresponding action protocols whereby FME Flow can push files out to that file storage location.
In Automations Run Workspace is labeled an action since it reacts to an incoming message and therefore must be set up by being connected to a Trigger.
Within an Automation, the Action protocol is called (as you might have guessed) Run a Workspace and falls under the Internal Action Category (orange node).
After selecting Run Workspace as the Action type, the user must first specify a Repository and workspace, the selected workspace is then examined, and a list of its published parameters is provided:
Having the parameters in a dialog like this means it is simple and easy to set up a workspace to run however you want it to in response to a trigger. Once created, whenever that Trigger receives a message from the sending client, the action will react by submitting that workspace to run on FME Flow.